package cn.ant;

import cn.ant.mqHandle.ProducerSend;
import org.springframework.amqp.core.Binding;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

import java.util.List;

@SpringBootApplication
public class TopicExchangeDemoApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext application = SpringApplication
                .run(TopicExchangeDemoApplication.class, args);
        // 获取Bean容器并调用生产者
        ProducerSend producerSend = application.getBean("producerSend", ProducerSend.class);
        producerSend.producerSendMsg();
    }
}
